﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="BlockUser.aspx.vb" Inherits="Assignment4.BlockUser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h1>Block/Unblock Users</h1>
    <p>
        <asp:GridView ID="grvUsers" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" 
            CellPadding="4" DataKeyNames="UserID" DataSourceID="SqlDataSourceProfiles" 
            AllowPaging="True" AllowSorting="True">
            <Columns>
                <asp:BoundField DataField="ProfileID" HeaderText="ProfileID" 
                    InsertVisible="False" ReadOnly="True" SortExpression="ProfileID" 
                    Visible="False" />
                <asp:BoundField DataField="UserID" HeaderText="UserID" SortExpression="UserID" 
                    Visible="False" />
                <asp:BoundField DataField="ProfileName" HeaderText="Name" 
                    SortExpression="ProfileName" />
                <asp:BoundField DataField="ProfileSurname" HeaderText="Surname" 
                    SortExpression="ProfileSurname" />
                <asp:ImageField DataImageUrlField='ProfileAvatar' 
                    DataImageUrlFormatString="../{0}">
                    <ControlStyle CssClass="gridpicture" />
                </asp:ImageField>
                <asp:CheckBoxField DataField="ProfileBlocked" HeaderText="Blocked" 
                    ReadOnly="True" SortExpression="ProfileBlocked" />
                <asp:ButtonField CommandName="Select" Text="Select" />
            </Columns>
            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
            <RowStyle BackColor="White" ForeColor="#003399" />
            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
            <SortedAscendingCellStyle BackColor="#EDF6F6" />
            <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
            <SortedDescendingCellStyle BackColor="#D6DFDF" />
            <SortedDescendingHeaderStyle BackColor="#002876" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSourceProfiles" runat="server" 
            ConnectionString="<%$ ConnectionStrings:learningConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:learningConnectionString.ProviderName %>" 
            SelectCommand="SELECT * FROM [Profiles]"></asp:SqlDataSource>
    </p>
    <p>
        <asp:Button ID="btnBlock" runat="server" Text="Block" />
        <asp:Button ID="btnUnblock" runat="server" Text="Unblock" />
    </p>
    <p>
        <asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
    </p>

</asp:Content>
